﻿using Furion.CMS.Application.Dto;
using Furion.CMS.Domain;
using Mapster;

namespace Furion.CMS.Application.Profile
{
    public class SystemProfile : IRegister
    {
        public void Register(TypeAdapterConfig config)
        {
            config.ForType<BlacklistInputDto, Blacklist>()
                .Map(dest => dest.HostAddress, src => src.IpAddress);

            config.ForType<AuditLog, OperateLogDto>()
                .Map(dest => dest.User, src => src.User.NickName);
        }
    }
}
